import useUserStore from "@/store/modules/user";
// 当存在一个权限则返回true
export default (permissions: string[]): boolean => {
    const uniquePermissions = [...new Set(permissions)];
    const userStore = useUserStore();
    return uniquePermissions.some(permission => {
        return userStore.userInfo.roles.includes(permission);
    }) || false;
}